﻿
@{
    ViewBag.Title = "商品规格";
}
@section CSS{
    <link href="~/Content/css/layerui/layui.css" rel="stylesheet" />
    <link href="~/Content/css/goods.css" rel="stylesheet" />
}
<div class="content-wrapper">
    <section class="content-header">
        <h1>
            商品
            <small>SKU</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">商品管理</a></li>
            <li><a href="#">商品列表</a></li>
            <li class="active">商品SKU</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class=""><a href="/goods/editgoods/@ViewBag.id">基本信息</a></li>
                        @*<li class=""><a href="/goods/GoodsSpec/@ViewBag.id">商品规格</a></li>*@
                        <li class="active"><a href="/goods/GoodsSku/@ViewBag.id" data-toggle="tab" aria-expanded="true">商品SKU</a></li>
                    </ul>
                    <div class="box">
                        <div class="box-body">
                            <div class="ibox float-e-margins">
                                <div class="ibox-content  mytablesku">
                                    <table class="table form-group ">
                                        <thead id="tablesku_title"></thead>
                                        <tbody id="tablesku_list"></tbody>
                                    </table>

                                    @*<table class="table table-striped table-bordered table-hover " id="editablesku">
                                        <thead>
                                            <tr>
                                                <th>编号</th>
                                                <th width="220px">商品名称</th>
                                                <th>规格值</th>
                                                <th>图片</th>
                                                <th>市场价</th>
                                                <th>平台价</th>
                                                <th>库存</th>
                                               <th>费率％</th>
                                                <th>是否上架</th>
                                                <th>编辑</th>
                                            </tr>
                                        </thead>
                                        <tbody id="tablespec"> </tbody>
                                    </table>*@
                                    <div class="box-footer " id="btn_div" style="display:none;">
                                        <div style="width:100%;height:50px;display:none;" >
                                            <input type="text" style="width:120px;float:left;" class="form-control" id="set_all_price" placeholder="请输入价格">
                                            <button type="button" class="btn btn-default" style="float:left;margin-right:10px;" id="btnPrice" onclick="SaveMulPrice();"><i class="fa  fa-gear"></i> 批量设置价格</button>
                                            <input type="text" style="width:120px;float:left;" class="form-control" id="set_all_stock" placeholder="请输入库存">
                                            <button type="button" class="btn btn-default" style="float:left;" id="btnStock" onclick="SaveMulStock(); "> <i class="fa  fa-gear"></i> 批量设置库存</button>
                                        </div>
                                        <div style="margin-top:10px;clear:both;display:none;">
                                            <button class="btn btn-danger center-block" type="button" id="btnMake" onclick="PublishGoods();">发布商品</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
@section JS{

    <script>
    var _id=@ViewBag.id;
    var _tid=@ViewBag.tid;
    var _skuNum=@ViewBag.skuCount;
    $(function () {
        if (_id != undefined) {
            getgoodsku(_id);
            //$("#editablesku").remove();
            //getgoodsku0(_id);
        }
    });

    </script>
    <script src="~/Content/js/GoodsSpec.js"></script>
}

